package net.akcegaraz.tipleague.server;

import java.util.Date;
import java.util.HashMap;

import net.akcegaraz.tipleague.client.service.TipService;
import net.akcegaraz.tipleague.shared.domain.Ticket;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

@SuppressWarnings("serial")
public class TipServiceImpl extends RemoteServiceServlet implements TipService {

    private final HashMap<String, Ticket> tickets = new HashMap<String, Ticket>();

    public Ticket addTicket(Ticket ticket) {
	tickets.put(new Date().toString(), ticket);
	return ticket;
    }

    public String hello() {
	return "hello";
    }

    public HashMap<String, Ticket> listTickets() {
	return tickets;
    }

}
